package main

import (
	"fmt"
)

var num6 int =100
var s2 string //""

func main()  {
	var age int
	age =100
	fmt.Println(age)

	age=200
	fmt.Print(age)

	var age2 int=30
	fmt.Println(age2)

	var num=200
	fmt.Print(num)

	num2:=400
	fmt.Println(num2)

	var a,b,c int
	a=3
	b=4
	c=5
	fmt.Println(a,b,c)

	var d,e,f int =6,7,8
	fmt.Println(d,e,f)

	var h,i=100,"memeda"
	fmt.Println(h,i)

	name,age3:="王才狗",30
	fmt.Println(name,age3)

	var(
		name2="老王"
		age4=40
	)
	fmt.Println(name2,age4)

	var age5 int
	age5=40
	fmt.Println(age5)

	age6,num6:=1,2
	fmt.Println(age6,num6)

	age7,num7:=3,4
	fmt.Println(age7,num7)

	var num3 int
	var s1 string
	var num4 float64
	var num5 bool
	fmt.Println(num3,s1,num4,num5)

	_,b1:=10,20
	fmt.Println(b1)

	const CPATH string ="www.baidu.com"
	const PI = 3.14
	fmt.Println(CPATH)
	fmt.Println(PI)

	const LENGTH int =10
	const WIDTH int =5

	var area int
	area = LENGTH * WIDTH
	fmt.Println(area)

	const C3 ="memeda"
	const con2=len(C3)

	fmt.Println(con2,C3)

	const a5,b5,c5 =1,false ,"str"
	fmt.Println(a5,b5,c5)

	const (
		a6=10
		b6=false
		c6=3.14
	)
	fmt.Println(a6,b6,c6)
	const (
		x uint16=16
		y
		s="abc"
		z
	)
	fmt.Println(x,y,s,z)

	const(
		sunday=0
		monday=1
		tuesday=2
		wednesday=3
		thursday=4
		friday=5
		saturday=6
	)


	const (
		a4=iota
		b4=iota
		c4=iota
	)
	fmt.Println(a4,b4,c4)

	const(
		a7=iota
		b7
		c7
	)
	fmt.Println(a7,b7,c7)

	const(
		aa=iota //0
		bb      //1
		cc      //2
		dd="ha"  //ha 3
		ee       //ha 4
		ff=100    //100 5
		gg         //100 6
		hh=iota     //7
		ii          //8
	)
	fmt.Println(aa,bb,cc,dd,ee,ff,gg,hh,ii)

	const(
		j=iota
	)
	fmt.Println(aa,bb,cc,dd,ee,ff,gg,hh,ii,j)
	const(
		x1='a'
		y1
		m1=iota
		n1
	)
	fmt.Println(x1,y1,m1,n1)

	var bb1 bool=false
	bb2:=true
	fmt.Printf("%T",bb1)
	fmt.Printf("%T",bb2)

	var num1 int8=100
	fmt.Println(num1)

	var num8 uint8=200
	fmt.Println(num8)

	var num9=400
	fmt.Println(num9)

	num10:='A'
	fmt.Println(num10)
	fmt.Printf("%d,%v,%q,%T\n",num10,num10,num10,num10)

	var num11 float32=3.14
	var num12 float64=5.44
	fmt.Printf("%f,%v,%T\n",num11,num11,num11)
	fmt.Printf("%f,%v,%T\n",num12,num12,num12)

	var s7 string ="memeda"
	s8:=`helloworld`
	s9:='a'
	s10:="a"
	s11:="ab"
	fmt.Println(s7,s8,s9,s10,s11)
	fmt.Println()
	a11:=100
	b11:=3.14
	c11:=`王二狗`
	d11:="hello"
	e11:=true
	f11:='A'
	fmt.Printf("%v,%T\n",a11,a11)
	fmt.Printf("%v,%T\n",b11,b11)
	fmt.Printf("%v,%T\n",c11,c11)
	fmt.Printf("%v,%T\n",d11,d11)
	fmt.Printf("%v,%T\n",e11,e11)
	fmt.Printf("%v,%T\n",f11,f11)

	fmt.Println("-------------")
	fmt.Printf("%d\n",a11)
	fmt.Printf("%f\n",b11)
	fmt.Printf("%s\n",c11)
	fmt.Printf("%s\n",d11)
	fmt.Printf("%t\n",e11)
	fmt.Printf("%q\n",f11)

	a12:=100
	b12:=3.84
	c12:=int(b12)
	sum1:=a12+c12
	fmt.Println(sum1)

	d12:=float64(a12)
	fmt.Printf("%T\n",d12)

	a13:=9
	b13:=4
	sum2:=a13+b13
	sub2:=a13-b13
	mul2:=a13*b13
	div2:=a13/b13
	fmt.Println(sum2,sub2,mul2,div2)

	mod2:=a%b
	fmt.Println(mod2)



	a14:=8
	b14:=5
	fmt.Println(a14<b14)
	fmt.Println(a14==b14)
	fmt.Println(a14!=b14)
	c14:=true
	d14:=false
	fmt.Println(c14==d14)

	b15:=false
	b16:=false
	b17:=true
	res1:=b15 &&b16 &&b17
	fmt.Println(res1)

	res2:=b15||b16||b17
	fmt.Println(res2)

	res3:=!b15
	fmt.Println(res3)

	a18:=3
	b18:=4
	c18:=true

	res4:=a18<4&&b18/2>1&&c18
	fmt.Println(res4)

	res5:=a18*2<b18 && b18%2!=0 &&!c18
	fmt.Println(res5)

	res6:=(a18+b18)/b18>=0||!c18||b18%2==0
	fmt.Println(res6)

	res7:=!(a*2<b)
	fmt.Println(res7)

	a19:=60
	b19:=13
	res8:=a19&b19
	res9:=a19|b19
	res10:=a19^b19

	fmt.Printf("%d,%b\n",a19,a19)
	fmt.Printf("%d,%b\n",b19,b19)
	fmt.Printf("%d,%b\n",res8,res8)
	fmt.Printf("%d,%b\n",res9,res9)
	fmt.Printf("%d,%b\n",res10,res10)

	res11:=b19<<2
	fmt.Println(res11)

	res12:=b19>>2
	fmt.Println(res12)




}

